package com.sbl.bajw.pc.action;




import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sbl.bajw.common.web.SessionUnit;


public class CodeServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;
	
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String ewmurl= request.getParameter("ewmurl");        
		String userIdString=SessionUnit.getUserId();
		TwoDimensionCode code=new TwoDimensionCode();
		code.encoderQRCode("http://"+request.getServerName()+":"+request.getServerPort()+ewmurl+"&user_id="+userIdString, response.getOutputStream(),"jpg",5);
		
	}

}
